package com.igbeok.miscellaneous.concurrency.hemberg2;

public class Test {

	public static void main(String[] args) {
		Pool pool = new Pool();
		Waiter waiter = new Waiter();
		Customer customer1 = new Customer(pool,waiter);
		Customer customer2 = new Customer(pool,waiter);
		Customer customer3 = new Customer(pool,waiter);
		Customer customer4 = new Customer(pool,waiter);
		Customer customer5 = new Customer(pool,waiter);
		
		Cooker cooker1 = new Cooker(waiter,pool);
		Cooker cooker2 = new Cooker(waiter,pool);
		Cooker cooker3 = new Cooker(waiter,pool);
		Cooker cooker4 = new Cooker(waiter,pool);
		Cooker cooker5 = new Cooker(waiter,pool);
		
		Thread t1 = new Thread(customer1);
//		Thread t2 = new Thread(customer2);
//		Thread t3 = new Thread(customer3);
//		Thread t4 = new Thread(customer4);
//		Thread t5 = new Thread(customer5);
		
		Thread c1 = new Thread(cooker1);
//		Thread c2 = new Thread(cooker2);
		/*Thread c3 = new Thread(cooker3);
		Thread c4 = new Thread(cooker4);
		Thread c5 = new Thread(cooker5);*/
		
		c1.start();
//		c2.start();
//		c3.start();
//		c4.start();
//		c5.start();
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		t1.start();
//		t2.start();
//		t3.start();
//		t4.start();
//		t5.start();
	}
}
